{% extends "base.html" %}

{% block title %}登陆管理后台{% endblock title %}
{% block body_attribs %}
    background="{{ url_for('static', filename='images/background.jpg') }}"
{% endblock body_attribs %}


{% block content %}
    <div class="container login-page">
        <div class="row">
            <div class="col-md-4 col-lg-offset-4">
                {% for category, message in get_flashed_messages(with_categories=true) %}
                    <div class="alert alert-{{ category }} alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                        {{ message }}
                    </div>
                {% endfor %}
                <h3 class="text-center">欢迎登陆Blog_mini管理后台</h3>
                <form class="form-horizontal" role="form" method="post" action="{{ url_for('auth.login') }}">
                    {{ form.csrf_token }}
                    <div class="form-group">
                        {{ form.email.label(class='col-sm-3 control-label') }}
                        <div class="col-sm-9">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                                {{ form.email(class='form-control', placeholder='请输入您的电子邮件', required='') }}
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        {{ form.password.label(class='col-sm-3 control-label') }}
                        <div class="col-sm-9">
                            <div class="input-group">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                                {{ form.password(class='form-control', placeholder='请输入您的密码', required='') }}
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-9">
                            <button type="submit" class="btn btn-default">登录</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
{% endblock content %}
